-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
separate infrastructure environments #1074
Conversation
terraform/main.tf
Outdated
@@ -4,7 +4,7 @@ terraform { | |||
required_providers { | |||
azurerm = { | |||
source = "hashicorp/azurerm" | |||
version = "~> 3.25.0" | |||
version = ">= 3.0.0, < 4.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version gets locked anyway, so no need to have a tighter constraint.
60834c9
to
d745102
Compare
|
||
data "azurerm_resource_group" "prod" { | ||
name = "RG-CDT-PUB-VIP-CALITP-P-001" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to environment.tf
.
14231da
to
8a2f169
Compare
e44e05c
to
2e81b11
Compare
03c8ee2
to
156c2e1
Compare
name = "SNET-CDT-PUB-CALITP-P-001" | ||
virtual_network_name = "VNET-CDT-PUB-SHRD-W-P-001" | ||
resource_group_name = local.network_resource_group_name | ||
subnet_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}/resourceGroups/${local.network_resource_group_name}/providers/Microsoft.Network/virtualNetworks/${local.vnet_name}/subnets/${local.subnet_name}" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removes the need to have read access to the subnet.
e465d7c
to
9eb4847
Compare
6348566
to
ce7034d
Compare
065325b
to
d3f4e75
Compare
The Terraform here is all ready to go, thus changes can be deployed manually (with |
d3f4e75
to
1072018
Compare
f36c00e
to
2ca301a
Compare
66868eb
to
df68eea
Compare
Instead of deploying to different slots in a single Resource Group, use separate ones to fully isolate environments. This includes Pipeline changes based on https://github.com/cal-itp/eligibility-server/tree/7be712310fedc7c0459d7baa36f632f5a1dee765/terraform/pipeline
df68eea
to
c4748ef
Compare
We are now seeing the pipeline working appropriately; see the run against |
Don't have permission to read.
c4748ef
to
0610720
Compare
# VNet uses a shared Resource Group, different from App Service Resource Group we use for Benefits stuff | ||
network_resource_group_name = local.is_prod ? "RG-CDT-PUB-SHRD-W-P-001" : "RG-CDT-PUB-D-001" | ||
vnet_name = local.is_prod ? "VNET-CDT-PUB-SHRD-W-P-001" : "VNET-CDT-PUB-D-001" | ||
subnet_name = local.is_prod ? "SNET-CDT-PUB-CALITP-P-001" : "SN-CDT-PUB-CALITP-${local.env_letter}-001" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the right side of this ternary correct? "SN-CDT-PUB-CALITP-${local.env_letter}-001"
Should it be "SNET-CDT-PUB-CALITP-${local.env_letter}-001"
? (SNET
instead of SN
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It matches what @cal-itp/cdt-devsecops named it, and I/we don't have permissions to modify 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As part of #1077, maybe we can raise where we are seeing inconsistencies.
This is the case when the `Run` button is pressed in the UI. Copied from cal-itp/eligibility-server@a9edf47.
I had already run a |
Closes #830. Running list of TODOs:
Update docs around environments, removing references to "slots"
Update deployment pipeline
DevSecOps:
Recover or purge Key Vault
KV-CDT-PUB-CALITP-D-001
Create VNet and Subnet(s) for dev and test
Provide VNet and Subnet names, and the Resource Group they're in
Give read permissions:
Create
Test
Resource GroupCreate Azure DevOps Service Connection to
Development
SubscriptionConfigure Front Door
Clean up unused resources in
Development
Resource Group:sacalitpd001
ASP-RGCDTPUBVIPCALITPD001-9628
Provide Active Directory Group ID
Rename resources to:
plan
output shorter and thus easier to reviewImport
test
resourcesUpdate DNS
TXT
recordSet up webhooks from GitHub
Set configuration variables and files for new environments
downgrade App Service plan #1142
Update IP address ranges in Eligibility Server